IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'MD3.f_RemoveBrackets'))
BEGIN
	DROP FUNCTION MD3.f_RemoveBrackets;
END 
GO
     
CREATE FUNCTION MD3.f_RemoveBrackets (@Value NVARCHAR(MAX))

   RETURNS NVARCHAR(MAX)
   WITH RETURNS NULL ON NULL INPUT
AS


BEGIN
		SELECT @Value = REPLACE(@Value,'[','')
		SELECT @Value = REPLACE(@Value,']','')
   RETURN @Value
END
GO
